package com.acerola.mrpc.protocol;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.atomic.AtomicInteger;

/**
 * @program: mrpc
 * @description: 保存请求和返回promise的对应关系
 * @author: Acerola
 * @create: 2022-12-10 19:13
 **/
public class RequestHolder {
    /**
     * 原子性,请求id
     */
    public static final AtomicInteger REQUSET_ID = new AtomicInteger();
    /**
     * 保存请求id和返回数据的对应关系
     */
    public static final Map<Long, RpcFuture> REQUEST_MAP = new ConcurrentHashMap<>();
}
